<?php
//显示更多内容
class MoreAction extends Action
{
	var $model = null;
	public function index(){
		$modelname = $_GET['modelname'];
		if(!empty($_GET['modelname'])){
		$this->model = M($_GET['modelname']);
		import("ORG.Util.Page");
		$count = $this->model->where("state=1")->count();
		$Page = new Page($count,10);
		$show = $Page->show();
		$list = $this->model->where("state=1")->limit($Page->firstRow.','.$Page->listRows)->order("id desc")->select();
		$this->assign("modelname",$modelname);
		$this->assign("list",$list);
		$this->assign("show",$show);
		//dump($modelname);
		//$this->display($this->list_template);
		$this->display("Finance/more_list");
		}
	}
	
	//显示特定一篇文章
	public function view(){
		$modelname = $_GET['modelname'];
		$id = $_GET['id'];
		if(!empty($id) && !empty($modelname)){
			$this->model = M($modelname);
			$vo = $this->model->GetById($_GET['id']);
			if($vo){
				$this->assign("vo",$vo);
				if($modelname == "FundsMerge"){
					$this->display("Finance/pattern_detail");
				}
				if($modelname == "IndustryNews"){
					$this->display("Finance/industrynews_detail");
				}
				if($modelname == "DatabaseFile"){
					$this->display("Finance/file_detail");
				}
			}
		}else{
			$this->error("非法操作");
		}
	}
}

?>